xend: Allow user to specify vslots 0 - 1f for static pass-through
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 10:40:28 +0000 (11:40 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 10:40:28 +0000 (11:40 +0100)
The current parser only accepts vslots 0 - f (hex), that is, only
slots that have one digit. This is an omission as two digit slots
with a leading 0 or 1 are also valid, representing the
full range of slots 0 - 1f.

Thanks to Dexuan Cui for spotting this problem.

Cc: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
tools/python/xen/xm/create.py

index 8ad0fe6dfdb79b17eb851e33afb40333d2f3f421..f5b505270b9506cdf401f14c4460f7f63b14091b 100644 (file)
@@ -1057,7 +1057,7 @@ def preprocess_pci(vals):
                 r"(?P<bus>[0-9a-fA-F]{1,2})[:,]" + \
                 r"(?P<slot>[0-9a-fA-F]{1,2})[.,]" + \
                 r"(?P<func>[0-7])" + \
-                r"(@(?P<vslot>[0-9a-fA-F]))?" + \
+                r"(@(?P<vslot>[01]?[0-9a-fA-F]))?" + \
                 r"(,(?P<opts>.*))?$", \
                 pci_dev_str)
         if pci_match!=None: